package com.china08.yxyapi.entity.mg.scoreport.report;

import java.util.Map;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.china08.yxyapi.entity.mg.MongoBaseEntityNoId;
import com.china08.yxyapi.entity.mg.scoreport.Exam;

/**
 * @author Richard.Wang 考试--基本分析.
 */
@SuppressWarnings("serial")
@Document(collection = "yxy.tea.score.report.exam.base.analyse")
public class ExamBaseAnalyse extends MongoBaseEntityNoId {

    /** 主键 和考试 exam 一对一 关系 */
    @Id
    private String id;

    /** */
    @DBRef(lazy = true)
    private Exam exam;

    /**
     * 柱状分布图, key 上限总分（分） 组距（分）</br>
     * 100 10、20、30、40、50、60、70、80、90、100 </br>
     * 120 12、24、36、48、60、72、84、96、108、120</br>
     * 150 15、30、45、60、75、90、105、120、135、150 </br>
     * 180 18、36、54、72、90、108、126、144、162、180 </br>
     * 
     * value : 人数
     * 
     */
    @Field(value = "histogram")
    private Map<String, Integer> histogram;

    @Field(value = "average")
    private Double average;// 平均分

    @Field(value = "max")
    private Double max;// 最高分

    @Field(value = "min")
    private Double min;// 最低分

    /**
     * 精确到小数点 后两位 , 59.3% 存储为 59.3
     */
    @Field(value = "score_rate")
    private Double scoreRate;// 得分率

    /**
     * 精确到小数点 后两位 , 59.3% 存储为 59.3
     */
    @Field(value = "lost_score_rate")
    private Double lostScoreRate;// 失分率

    /**
     * key : "high","middle","low"</br>
     * value:
     */
    @Field(value = "score_level")
    private Map<String, ScoreLevel> scoreLevel;

    /**
     * 优良分布图 key: 5,4,3,2,1 分别对应 "优秀","良好","及格","不及格","不及格过差"</br>
     * value: 对应的分值.
     * 
     */
    @Field(value = "fine_rank")
    private Map<Integer, Integer> fineRank;

    /**
     * 难度基本: 1-容易 2-一般 3-难 4-非常难
     */
    @Field(value = "difficult_degree")
    private Integer difficultDegree;

    /**
     * 报告,评语
     */
    @Field(value = "remark")
    private String remark;

    public class ScoreLevel {
        public String level;// 存储"96~120", "72~96"
        public Integer count;// 存储人数
        public String concentrate;// 集中度 "高", "低"
        public Double rate;// 所占百分比 .

    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Exam getExam() {
        return exam;
    }

    public void setExam(Exam exam) {
        this.exam = exam;
    }

    public Map<String, Integer> getHistogram() {
        return histogram;
    }

    public void setHistogram(Map<String, Integer> histogram) {
        this.histogram = histogram;
    }

    public Double getAverage() {
        return average;
    }

    public void setAverage(Double average) {
        this.average = average;
    }

    public Double getMax() {
        return max;
    }

    public void setMax(Double max) {
        this.max = max;
    }

    public Double getMin() {
        return min;
    }

    public void setMin(Double min) {
        this.min = min;
    }

    public Double getScoreRate() {
        return scoreRate;
    }

    public void setScoreRate(Double scoreRate) {
        this.scoreRate = scoreRate;
    }

    public Double getLostScoreRate() {
        return lostScoreRate;
    }

    public void setLostScoreRate(Double lostScoreRate) {
        this.lostScoreRate = lostScoreRate;
    }

    public Map<String, ScoreLevel> getScoreLevel() {
        return scoreLevel;
    }

    public void setScoreLevel(Map<String, ScoreLevel> scoreLevel) {
        this.scoreLevel = scoreLevel;
    }

    public Map<Integer, Integer> getFineRank() {
        return fineRank;
    }

    public void setFineRank(Map<Integer, Integer> fineRank) {
        this.fineRank = fineRank;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getDifficultDegree() {
        return difficultDegree;
    }

    public void setDifficultDegree(Integer difficultDegree) {
        this.difficultDegree = difficultDegree;
    }

}
